%% uklid
clc
clear
close all

%% skript
%konstanty
param.a=1.446;
param.b=1.408;
param.c=1.4370;
param.I=1549.034;
param.m=2220;   
param.g=9.81;


dy=0;
dx=10;
psi=0;
dpsi=0;
Y=0;
X=0;

deltaf=0;
deltar=0;
sfl=0;
sfr=0;
srl=0;
srr=0;

[A,B,C,D]=carLin([dy;dx;psi;dpsi;Y;X],[deltaf;sfl;sfr;srl;srr],param);
A

sys1=c2d(ss(A,B,C,D),0.01);

psi=pi;
[A,B,C,D]=carLin([dy;dx;psi;dpsi;Y;X],[deltaf;sfl;sfr;srl;srr],param);
A

sys2=c2d(ss(A,B,C,D),0.01);
sys1.A
sys2.A